package com.zs.grain.ui

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.xnkj1688.semplibrary.mvvm.BaseViewModel
import com.zs.grain.R
import com.zs.grain.service.DataService
import com.zs.grain.service.DeviceService
import javax.inject.Inject

class TempViewModel @Inject constructor(
    val mApp: Application,
    val mDataService: DataService,
    val mDeviceService: DeviceService
) : BaseViewModel(mApp) {
    val isMachineInit = MutableLiveData<Boolean>()
    val isMachineRemotePush = MutableLiveData<Boolean>()
    val picShow = MutableLiveData<Int>()
    val isReady = MutableLiveData<Boolean>()
    var maintenance = MutableLiveData<String>()
    var machineInit = MutableLiveData<String>()
    var machineRemotePush = MutableLiveData<String>()
    val menuViewModels = MutableLiveData<MutableList<MenuViewModel>>()
    val phoneNum = mDataService.phoneNum
    init {
        picShow.value = 3
        isReady.value = true
        isMachineInit.value = false
        isMachineRemotePush.value = false
        maintenance.value = "res://${mApp.packageName}/${R.mipmap.maintenance}"
        machineInit.value = "res://${mApp.packageName}/${R.mipmap.ismachineinit}"
        machineRemotePush.value  = "res://${mApp.packageName}/${R.mipmap.isremotepush}"
    }

    fun init(tempType:Int){
        picShow.postValue(tempType)
        when(tempType){
            1->{
            }
            2->{

            }
            3->{

            }
        }
    }
}